<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{$websiteData['titles']}} - 首页</title>
    <meta name="description" content="{{$websiteData['description']}}" />
    <meta name="keywords" content="{{$websiteData['keywords']}}" />
    <link rel="stylesheet" href="/static/home/css/website3/style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .hero h2 {
            font-size: 2rem;
            margin-bottom: 1.5rem;
            animation: 1s ease 0s 1 normal none running fadeInDown;
        }
        .hero p{
            font-size: 1rem;
        }
    </style>
</head>
<body>
<!-- 头部导航 -->
@include("home.index3.header")

<!-- 特色英雄区域 - 使用banner图片 -->
<section class="hero">
    <div class="container hero-content">
        <h2>{{$websiteData['titles']}}</h2>
        <p>{{$websiteData['keywords']}}</p>
        <div class="hero-btns">
            <a href="{{route('home.article.list')}}?nvabar=2" class="btn btn-primary">浏览文章</a>
            <a href="{{route('home.article.list')}}?nvabar=2" class="btn btn-secondary">了解更多</a>
        </div>
    </div>
</section>

<!-- 特色区域 -->
<section class="features">
    <div class="container">
        <h2 class="section-title">为什么选择我们</h2>
        <div class="features-grid">
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-graduation-cap"></i>
                </div>
                <h3>专业内容</h3>
                <p>由行业专家和资深开发者撰写的高质量文章，涵盖最新热点和最佳实践。</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-rocket"></i>
                </div>
                <h3>优质媒体</h3>
                <p>200+央媒、5000+门户及网媒全覆盖；新闻客户端3W+账号资源全覆盖。</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-users"></i>
                </div>
                <h3>专业服务</h3>
                <p>专业客服团队7*24h客户服务，让问题第一时间得到解决。</p>
            </div>
        </div>
    </div>
</section>

<!-- 精选文章区域 -->
<section class="featured-posts">
    <div class="container">
        <div class="section-header">
            <h2 class="section-title">精选文章</h2>
            <a href="{{route('home.article.list')}}?nvabar=2" class="view-all">查看全部 <i class="fas fa-arrow-right"></i></a>
        </div>
        <div class="posts-grid">
            <!-- 文章卡片1 -->
            @foreach($data as $val)
            <article class="post-card">
                <div class="post-image">
                    <img src="{{$val['thumb']}}" alt="Vue 3.0">
                    <span class="post-category">{{$val['topic_titles']}}</span>
                </div>
                <div class="post-content">
                    <h3 class="post-title"><a href="{{route('home.article.info')}}?id={{$val['id']}}&nvabar=3">{{$val['title']}}</a></h3>
                    <p class="post-excerpt">{{$val['brief']}}</p>
                    <div class="post-meta">
                        <span>{{$val['publish_time']}}</span>
                        <div class="post-author">
                            <span class="icon">📖</span>
                            <span>{{$val['read_count']}}</span>
                        </div>
                    </div>
                </div>
            </article>
            @endforeach
        </div>
    </div>
</section>

<!-- 统计区域 -->
<section class="stats">
    <div class="container">
        <div class="stats-grid">
            <div class="stat-item">
                <div class="stat-number">500+</div>
                <div class="stat-label">技术文章</div>
            </div>
            <div class="stat-item">
                <div class="stat-number">50+</div>
                <div class="stat-label">专业作者</div>
            </div>
            <div class="stat-item">
                <div class="stat-number">10K+</div>
                <div class="stat-label">活跃读者</div>
            </div>
            <div class="stat-item">
                <div class="stat-number">8</div>
                <div class="stat-label">技术领域</div>
            </div>
        </div>
    </div>
</section>

<!-- 通讯订阅区域 -->
<section class="newsletter">
    <div class="container">
        <div class="newsletter-content">

        </div>
    </div>
</section>

<!-- 页脚 -->
@include("home.index3.footer")

<script>
    // 添加滚动效果
    window.addEventListener('scroll', function() {
        const header = document.querySelector('header');
        if (window.scrollY > 100) {
            header.style.background = 'rgba(255, 255, 255, 0.98)';
            header.style.boxShadow = '0 5px 15px rgba(0, 0, 0, 0.1)';
        } else {
            header.style.background = 'rgba(255, 255, 255, 0.95)';
            header.style.boxShadow = '0 4px 6px rgba(0, 0, 0, 0.1)';
        }
    });

    // 统计数字动画
    function animateStats() {
        const statNumbers = document.querySelectorAll('.stat-number');
        statNumbers.forEach(stat => {
            const target = parseInt(stat.textContent);
            let current = 0;
            const increment = target / 50;
            const timer = setInterval(() => {
                current += increment;
                if (current >= target) {
                    stat.textContent = target + (stat.textContent.includes('K') ? 'K+' : '+');
                    clearInterval(timer);
                } else {
                    stat.textContent = Math.floor(current) + (stat.textContent.includes('K') ? 'K+' : '+');
                }
            }, 30);
        });
    }

    // 当统计区域进入视口时触发动画
    const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
            if (entry.isIntersecting) {
                animateStats();
                observer.unobserve(entry.target);
            }
        });
    }, { threshold: 0.5 });

    observer.observe(document.querySelector('.stats'));
</script>
</body>
</html>
